package spring.controller.converter;

import org.springframework.core.convert.converter.Converter;
import spring.model.Persistivel;

public class EntityString<T extends Persistivel> implements Converter<T, String> {

	@Override
	public String convert(T entity) {
		return entity == null ? "" : entity.getId() == null ? "" : String.valueOf(entity.getId());
	}
}
